home *** CD-ROM | disk | FTP | other *** search
- Sub ExitSaver ()
- Unload Form1
- End Sub
-
- Sub Form_Click ()
- ExitSaver
- End Sub
-
- Sub Form_Load ()
-
- ' See if we're already running
-
- If App.PrevInstance Then End
-
- ' Make picture invisible while we set it up
-
- Picture1.Visible = False
-
- ' Set path for file searches
-
- File1.Path = App.Path + "\PICS"
-
- ' Make sure we've got at least one file!
-
- If File1.ListCount <> 0 Then
- Randomize
- Choice = Int((File1.ListCount * Rnd) + 1) - 1
- Path$ = File1.Path + "\" + File1.List(Choice)
- Picture1.Picture = LoadPicture(Path$)
-
- ' Centre Picture1 on the screen
-
- Picture1.Left = (Screen.Width - Picture1.Width) / 2
- Picture1.Top = (Screen.Height - Picture1.Height) / 2
-
- ' Now make it visible
-
- Picture1.Visible = True
- End If
- End Sub
-
- Sub Picture1_Click ()
- ExitSaver
- End Sub
-
- Sub Picture1_KeyPress (KeyAscii As Integer)
- ExitSaver
- End Sub
-